{include file="$temps.head" title="$webs.title" keywords="$webs.keywords" description="$webs.description" /}
<nav class="layout wx-arti-nav cx-fex pos-f">
    <a class="cx-fex-c fex-column b-r" href="{:url('Index/index')}" data-ajax="false">
        <span><i class="cx-icon cx-icon-shouye t-18"></i></span>
        <span>首页</span>
    </a>
    <a class="cx-fex-c nav-shouchang fex-column cx-click {in name='$contdb.aid' value='$cxbsuser.ucollection'}t-red{/in}" data-type="shouchang" data-aid="{$contdb.aid}">
        <span><i class="cx-icon {in name='$contdb.aid' value='$cxbsuser.ucollection'}cx-icon-xihuan1{else /}cx-icon-xihuan{/in} t-18"></i></span>
        <span>收藏</span>
    </a>
    <a class="cx-fex-c button bg-yellow fex-items-c t-reverse cx-click" data-type="goumai" data-aid="{volist name='$contdb.paid' id='cx' empty=''}{$cx.aid},{/volist}" data-val="goumai" style="flex-grow: 2;line-height: 40px;">原价购买</a>
    <a class="cx-fex-c button bg-red fex-items-c t-reverse cx-click" data-type="tuangou" data-aid="{$contdb.aid}" {notempty name="$Request.param.oid"}data-oid="{$Request.param.oid}"{/notempty} style="flex-grow: 2;line-height: 40px;">我要参团</a>
</nav>
<section class="layout bg-fff">
    <div id="listshop" class="layout cx-huandenglist pad-a5">
        <div class="cx-huandenglist-k">
        <div class="cx-huandenglist-n">
            <ul class="cx-huandenglist-ul">
                {neq name="contdb.pinimg" value="0"}
                <li class="cx-huandenglist-li">
                    <img class="img-responsive" src="{$contdb.pinimg}" alt="{$contdb.title}" >
                </li>
                {/neq}
                {volist name="$contdb.paid" id="cx" empty="" key="key"}
                {volist name="$cx.imgs" id="c" empty=""}
                <li class="cx-huandenglist-li">
                    <img class="img-responsive" src="{$c.value}" alt="{$contdb.title}">
                </li>
                {/volist}
                {/volist}
            </ul>
        </div>
        </div>
    </div>
    <h1 class="t-16 pad-a10 artcont-title">{$contdb.title}</h1>
    <div class="layout pad-l10 pad-r10">
        <div class="layout t-red cx-fex-c tuan-time">
        <div class="dtimes t-14" data-times="{$contdb.jietims}"><i class="cx-icon cx-icon-shijian mr-5"></i><span></span></div>
        </div>
    </div>
    <div class="layout cx-fex pad-a10">
        <div class="cx-fex-l fex-items-c">
            <div class="in-tuangou-jiah t-14 t-red">
                <i class="cx-icon cx-icon-renminbi1688"></i>
                <span class="t-18">
                {eq name="$contdb.pinclass" value="正常团"}{$contdb.pinmoney}{else /}0{/eq}
                </span>
            </div>
            <div class="ml-20 t-gray">
                {:get_count('Order',array('aid'=>$contdb.aid))} 人已{eq name="$contdb.pinclass" value="正常团"}付款{else /}报名{/eq}
            </div>
        </div>
        <a class="cx-click t-gray cx-fex-c fex-column fex-items-c" data-type="haibao" data-aid="{$contdb.aid}">
            <i class="cx-icon cx-icon-lingcunwei" style="font-size: 2.4rem"></i>
            <span class="t-12">分享</span>
        </a>
    </div>
</section>
<div class="layout mt-10">
    <div class="layui-tab layui-tab-brief bg-fff pad-a10" lay-filter="docDemoTabBrief">
        <ul class="layout cx-fex layui-tab-title shop-tabtitle cx-fixed">
            <li class="layui-this">团购详情</li>
            <li>产品参数</li>
            <li>评论</li>
        </ul>
        <div class="layui-tab-content">
            <div class="layui-tab-item layui-show">
                {$contdb.articleconts}
            </div>
            <div class="layui-tab-item">
                {volist name="$contdb.paid" id="cx" empty="" key="key"}
                <ul class="shop-class mb-15">
                    <li>
                        <span class="t-gray">产品:</span>
                        <span class="t-yellow">{$cx.title}</span>
                    </li>
                    <li>
                        <span class="t-gray">品牌:</span>
                        <span class="t-yellow">{$cx.pinpai}</span>
                    </li>
                    <li>
                        <span class="t-gray">型号:</span>
                        <span class="t-yellow">{$cx.xinghao}</span>
                    </li>
                    <li class="cx-fex-l">
                        <span class="t-gray">价格:</span>
                        <div class="t-14 t-yellow">
                            <i class="cx-icon cx-icon-renminbi1688"></i>
                            <span class="t-yellow">
                            {switch name="$cxbsuser.group_id" }
                            {case value="5"}{$cx.shichuangjia}{/case}
                            {case value="6"}{$cx.yinjia}{/case}
                            {case value="7"}{$cx.jinjia}{/case}
                            {case value="8"}{$cx.pifajia}{/case}
                            {default /}
                            {$cx.shichuangjia}
                            {/switch}
                            </span>
                        </div>
                    </li>
                    <li>
                        <span class="t-gray">重量:</span>
                        <span class="t-yellow">{$cx.zhongliang} g</span>
                    </li>
                    {volist name="cx.confs" id="c" empty=""}
                    <li>
                        <span class="t-gray">{$c.title}:</span>
                        <span class="t-yellow">{$c.value}</span>
                    </li>
                    {/volist}
                </ul>
                {/volist}
            </div>
            <div class="layui-tab-item">
                <ul class="layout fex-column">
                    {volist name="comment" id="cx" empty=""}
                    <li class="layout cx-fex-l arti-pingk">
                        <div class="xl3">
                            <div class="layout arti-ping">
                                <img class="img-responsive" src="{$cx.usericon|default=''}" alt="">
                            </div>
                        </div>
                        <div class="xl9 arti-ping-txt">
                            <div class="layout t-gray t-12">{$cx.addtime|date="Y-m-d",###}</div>
                            <div class="layout arti-ping-c">
                                {$cx.comment}
                            </div>
                        </div>
                    </li>
                    {/volist}
                </ul>
            </div>
        </div>
    </div>
</div>
<input id="goumai" type="hidden" value="1">
<div style="height: 60px;width: 100%"></div>
{load href="__JS__/jquerymobile/jquery.mobile-1.4.5.min.js" /}
<script>
    $("#zznav").hide();
    $('.dtimes').each(function () {
        var d = $(this);
        var t = d.data();
        layui.use('util', function(){
            var layutil = layui.util;
            var serverTime = new Date().getTime(),
                ktime = new Date(t.times);
            layutil.countdown(ktime, serverTime, function(date, serverTime, timer){
                var str = date[0] + '天' + date[1] + '时' +  date[2] + '分' + date[3] + '秒';
                $(d).find('span').text('仅剩：'+ str);
            });
        });
    });
    layui.use('element', function(){
        var element = layui.element;
    });
</script>
<script>
    wx.config({
        appId: '{$webdb.wxappid}', // 必填，公众号的唯一标识
        timestamp: '{$wxjsapi.timestamp}', // 必填，生成签名的时间戳
        nonceStr: '{$wxjsapi.noncestr}', // 必填，生成签名的随机串
        signature: '{$wxjsapi.sing}',// 必填，签名
        jsApiList: [
            'updateAppMessageShareData',
            'updateTimelineShareData',
            'onMenuShareTimeline',
            'onMenuShareQQ',
            'onMenuShareWeibo',
            'onMenuShareQZone',
            'onMenuShareAppMessage'
        ] // 必填，需要使用的JS接口列表
    });
    wx.ready(function(){
        wx.checkJsApi({
            jsApiList: [
                'updateAppMessageShareData',
                'updateTimelineShareData',
                'onMenuShareTimeline',
                'onMenuShareQQ',
                'onMenuShareWeibo',
                'onMenuShareQZone',
                'onMenuShareAppMessage'
            ]
        });
        wx.updateAppMessageShareData({
            title: "{$contdb.title}",// 分享标题
            link: "{$wxjsapi.url}", // 分享链接，该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
            desc: "{$wxuserdata.conf.nickname}邀你一起来拼：{$contdb.title}",
            imgUrl: '{$webdb.www_url}{$contdb.picurl}', // 分享图标
        }, function(res) {
        });
        wx.updateTimelineShareData({
            title: "{$contdb.title}",// 分享标题
            link: "{$wxjsapi.url}", // 分享链接，该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
            imgUrl: "{$webdb.www_url}{$contdb.picurl}", // 分享图标
        }, function(res) {
        });
        wx.onMenuShareTimeline({
            title: "{$contdb.title}", // 分享标题
            link: "{$wxjsapi.url}", // 分享链接，该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
            imgUrl: "{$webdb.www_url}{$contdb.picurl}", // 分享图标
            success: function () {
                // 用户点击了分享后执行的回调函数
            },
        });
        wx.onMenuShareQQ({
            title: "{$contdb.title}",// 分享标题
            desc: "{$wxuserdata.conf.nickname}邀你一起来拼：{$contdb.title}",
            link: "{$wxjsapi.url}", // 分享链接，该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
            imgUrl: '{$webdb.www_url}{$contdb.picurl}', // 分享图标
            type: '',
            dataUrl: '',
            success: function () {

            }
        });
        wx.onMenuShareWeibo({
            title: "{$contdb.title}",// 分享标题
            desc: "{$wxuserdata.conf.nickname}邀你一起来拼：{$contdb.title}",
            link: "{$wxjsapi.url}", // 分享链接，该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
            imgUrl: '{$webdb.www_url}{$contdb.picurl}', // 分享图标
            success: function () {

            }
        });
        wx.onMenuShareQZone({
            title: "{$contdb.title}",// 分享标题
            desc: "{$wxuserdata.conf.nickname}邀你一起来拼：{$contdb.title}",
            link: "{$wxjsapi.url}", // 分享链接，该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
            imgUrl: '{$webdb.www_url}{$contdb.picurl}', // 分享图标
            success: function () {

            }
        });
        wx.onMenuShareAppMessage({
            title: "{$contdb.title}",// 分享标题
            desc: "{$wxuserdata.conf.nickname}邀你一起来拼：{$contdb.title}",
            link: "{$wxjsapi.url}", // 分享链接，该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
            imgUrl: '{$webdb.www_url}{$contdb.picurl}', // 分享图标
            type: '',
            dataUrl: '',
            success: function () {

            }
        });
    });
</script>
{include file="$temps.foot" /}
<div id="shopnum" class="layout pos-r" style="display: none">
    <div class="layout cx-fex fex-column pad-a10 pos-r">
        <div class="layout cx-fex-r pos-r">
            <div class="xl3 shop-picurl pos-a">
                <img class="img-responsive" src="{$contdb.picurl}" alt="">
            </div>
            <div class="xl9 pad-l30 cx-fex">
                <div class="xl10 cx-fex fex-column">
                    <span class="t-18 t-red">
                        <i class="cx-icon cx-icon-renminbi1688 mr-10 t-14"></i>
                        {$contdb.pinmoney}
                    </span>
                    <span class="t-gray">库存 {$contdb.rennum} 件</span>
                </div>
                <span class="cx-click" data-type="closea"><i class="cx-icon cx-icon-cuowu"></i></span>
            </div>
        </div>
        <div class="layout cx-fex b-t mt-10 pad-t20 pad-b10">
            <span style="line-height: 34px;">选择数量</span>
            <div class="xl6 cx-fex-r">
                <i class="button cx-icon cx-icon-minus cx-click" data-type="artnumadd" data-kc="{$contdb.rennum}" data-cid="0"></i>
                <div style="width: 50px;"><input id="artnum" class="ipt t-c" type="text" value="1"></div>
                <i class="button cx-icon cx-icon-add cx-click" data-type="artnumadd" data-kc="{$contdb.rennum}" data-cid="1"></i>
            </div>
        </div>
    </div>
    <nav class="layout wx-arti-nav cx-fex">
        <a class="cx-fex-c fex-column b-r" href="{:url('Index/index')}" data-ajax="false">
            <span><i class="cx-icon cx-icon-shouye t-18"></i></span>
            <span>首页</span>
        </a>
        <a class="cx-fex-c fex-column nav-shouchang cx-click {in name='$contdb.aid' value='$cxbsuser.ucollection'}t-red{/in}" data-type="shouchang" data-aid="{$contdb.aid}">
            <span><i class="cx-icon {in name='$contdb.aid' value='$cxbsuser.ucollection'}cx-icon-xihuan1{else /}cx-icon-xihuan{/in} t-18"></i></span>
            <span>收藏</span>
        </a>
        <a class="cx-fex-c button bg-yellow fex-items-c t-reverse cx-click" data-type="gouwuche" data-aid="{$contdb.aid}" style="flex-grow: 2;line-height: 40px;">加入购物车</a>
        <a class="cx-fex-c button bg-red fex-items-c t-reverse cx-click" data-type="goumai" data-aid="{$contdb.aid}" style="flex-grow: 2;line-height: 40px;">立即购买</a>
    </nav>
</div>
<div id="tuierweima" class="layout cx-fex-c fex-column">
    <div class="xl10 tuiguangimg"></div>
    <div class="xl9" style="margin: 20px auto 0 auto">
        <div class="layout t-12 t-c t-gray">长按保存图片</div>
    </div>
</div>
